package com.justech.eat.service.impl;

import com.justech.eat.entity.SysUser;
import com.justech.eat.mapper.mysql.SysUserMapper;
import com.justech.eat.repository.SysUserRepository;
import com.justech.eat.service.SysUserInternalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: eat-service
 * @description:
 * @author: feifei.li
 * @create: 2020-06-01 17:08
 **/
@Service
public class SysUserInternalServiceImpl implements SysUserInternalService {
    @Autowired
    SysUserMapper sysUserMapper;
    @Autowired
    SysUserRepository sysUserRepository;

    /**
     * 获取所有在职用户
     *
     * @return
     */
    @Override
    public List<SysUser> getAllByOnJob() {
        /*在用户表中：0表示离职、1在职*/
        return sysUserRepository.findAllByFStatus(1);
    }
}
